//
//  YDMyInfoModel.m
//  YDTestDrive
//
//  Created by ios on 2017/2/14.
//  Copyright © 2017年 ios. All rights reserved.
//

#import "YDMyInfoModel.h"

@implementation YDMyInfoModel


- (void)setValue:(id)value forKey:(NSString *)key
{
    if ([key isEqualToString:@"brands"])
    {
        //品牌信息
        NSMutableString *brandName = [NSMutableString string];
        for (NSDictionary *dic in value) {
            NSString *brandsNameStr = [dic valueForKey:@"brandsName"];
            if ([brandsNameStr isKindOfClass:[NSString class]]) {
                [brandName appendFormat:@"%@", brandsNameStr.length > 0 ? brandsNameStr : @""];
            }
        }
        _brandsName = brandName;
    }
    else
    {
        [super setValue:value forKey:key];
    }
}

@end
